package user

import (
	v1 "gitcode.com/G-YT/ANN/server/api/v1"
	"github.com/gin-gonic/gin"
)

type UserRouter struct {
}

func (u *UserRouter) InitUserRouter(Router *gin.RouterGroup, pub *gin.RouterGroup) {
	userRouter := Router.Group("user")
	pubRouter := pub.Group("user")
	userApi := v1.ApiGroupApp.UserApiGroup.UserApi
	{
		userRouter.GET("getInviteLink", userApi.GetUserInviteLink)           // 获取邀请链接
		userRouter.POST("updatePassword", userApi.ChangePassword)            // 用户修改密码
		userRouter.GET("myThoughts", userApi.MyThoughts)                     // 我的心德
		userRouter.GET("submitOpenVip", userApi.SubmitOpenVip)               // 提交开通&续费会员
		userRouter.GET("getUserDivisionInfo", userApi.GetUserDivisionInfo)   // 获取用户成就
		userRouter.GET("getUserDivisionRank", userApi.GetUserDivisionRank)   // 获取用户段位排行榜
		userRouter.GET("getCountWeeklyPoints", userApi.GetCountWeeklyPoints) // 获取用户一周积分
	}
	{
		pubRouter.GET("getUserByVipLevel", userApi.GetUserByVipLevel) // 根据会员等级获取用户信息
	}
	{
		pubRouter.GET("translateTable", userApi.TranslateTable) // 迁移用户数据
	}
}
